 
 
<div class="panel panel-default" style=" ">	

    
    <ul class="nav nav-tabs" style="margin-top: 5px; padding-left: 10px;">
  
        <li class="{if (empty($rd) || $rd=='index')}active{/if}">
        <a href="{php echo $this->createWebUrl('village', array('op' => $operation))}"> 
			 {$submenus[$operation]['name']}列表</a></li>
        <li  class="{if ( $rd=='add')}active{/if}">
        <a href="{php echo $this->createWebUrl('village', array('op' => $operation,'rd'=>'add'))}">新增 </a></li>
     
    </ul>

    <div class="panel-body"> 
		<!-- 搜索栏开始 -->
		<div class="search-box" style="margin-bottom: 20px;  ">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="kbwdl_shequzufang" />
				<input type="hidden" name="do" value="village" />
				<input type="hidden" name="op" value="{$operation}" />
					 
				 <div style="display:flex;  align-items: center;">
							  
							   <div  style="display: flex; align-items: center; margin-right: 10px;">
								<span style="display:table-cell; ">区域：</span>    
				 <span style="display:table-cell; "> 
	  <?php if(!empty($citys)){ echo
	 form_element::select($citys,'city_id','city_id',1,'1','city', 'onchange="navcityto(this)"');
		}
	 ?>      
		   </span>
			 <span id="areasbd" style="display:table-cell; ">  
	 <?php  echo  form_element::select($sec['areas'],'area','area',$_GPC['area']); ?>
		 </span>
								</div>
							  <div style="margin-right: 10px;">
								  <input class="form-control" name="keyword" id="" placeholder="请输入关键词" type="text" value="{$_GPC['keyword']}">
							 </div>
								
						 <div>
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
						</div>
	
				</div> 
	 
			</form>
		</div>
		<!-- 搜索栏end -->
		<table class="table table-hover">
			<thead class="navbar-inner"> 
				<tr>
                    <th style="width:5%;">ID</th>
					 <th style="width:15%;"> 名称</th>
					<th style="width:15%;">区域</th> 
					<th >房源</th> 
					{if $type ==3}
					<!-- 小区显示地图坐标是否标注 -->
					<th style="width:10%;">周边数据</th>
					<th style="width:5%;">地图</th>
					{/if}
				 	  <th style="width:5%;">排序 </th> 
					<th style=" width:5%;">状态 </th>
                     <th style="text-align:right; width:10%;">管理</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $item}
				<tr>
					<td>{$item['id']}</td>
				 
                    <td>
                        <p title="{$item['name']}">{$item['name']} </p>
                                        
					</td>
					
                     
                    <td>{$citys[$item['parent_id']]}  {$item['area']}  </td>
                    <td>
						{php echo \Wdl\helper\VillageHelper::get_village_house_nums($item['area'] , $item['name'])}
					</td>
					{if $item['type'] ==3}
					<!-- 小区显示地图坐标是否标注 -->
					<td>
						{php $haslbs =\Wdl\helper\VillageHelper::has_lbs_data($item['id'])}
						{if $haslbs}<a class="btn" onClick="showmapdata({$item['id']})">已获取</a>{else}--{/if}
					</td>
					<td>
						<?php 
							 
							if($item['point']){
								$mapinfo = explode(',',$item['point']);
								$item['lng'] = isset($mapinfo[0])?$mapinfo[0]:'' ;
								$item['lat'] = isset($mapinfo[1])?$mapinfo[1]:'';
							}
						?>
						
							{if $item['point']}
							<a class="btn" onClick="modifyCoordinate({$item['id']},'{$item['lat']}', '{$item['lng']}')"  title="已经标注">
							<i id="mapbiao{$item['id']}" style="color: #3296fa; font-size: 18px;" class="fa fa-map-marker"></i></a>
							{else} 
							<a class="btn" onClick="modifyCoordinate({$item['id']},'{$item['lat']}', '{$item['lng']}','{$citys[$item['parent_id']]}{$item['area']}{$item['name']}')"  title="未标注">
							<i id="mapbiao{$item['id']}" style="color:#999; font-size: 18px;" class="fa fa-map-marker"></i></a>
							{/if}
							
						 
					</td>
					{/if} 
					<td>
                        {$item['orderid']}
					</td>
                    <td>
                        {if $item['disabled']==1}禁用{else}启用{/if} 
					</td>
					

					<td style="text-align:right;">

					                                    
		<a href="{php echo $this->createWebUrl('village', array('id' => $item['id'], 'op' =>$operation, 'rd'=> 'add'))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="编辑">
                    <i class="fa fa-pencil"></i></a>&nbsp;&nbsp;

		<a href="{php echo $this->createWebUrl('village', array('id' => $item['id'], 'op' =>$operation,'rd' => 'delete'))}" onclick="return confirm('此操作不可恢复，确认删除？');return false;" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="删除">
                    <i class="fa fa-times"></i></a>

	 				
					</td>

				</tr>

				{/loop}

			</tbody>

		</table>

		{$pager}

	</div>
     
	</div>
 